package com.lc.provider;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.github.pagehelper.PageInfo;
import com.lc.entity.Page;
import com.lc.service.BaseService;

public class BaseProviderImpl<P extends BaseService<T>, T> implements BaseProvider<T> {

	@Autowired
	private P baseService;

	@Override
	public T selectOne(Object obj) {
		return baseService.selectOne(obj);
	}

	@Override
	public List<T> select(Object obj) {
		return baseService.select(obj);
	}

	@Override
	public PageInfo<T> selectByPage(Object obj, Page page) {
		return baseService.selectByPage(obj, page);
	}

	@Override
	public int insert(T t) {
		return baseService.insert(t);
	}

	@Override
	public int update(T t) {
		return baseService.update(t);
	}

	@Override
	public int delete(Object obj) {
		return baseService.delete(obj);
	}
}